/*
 * =====================================================================================
 *
 *       Filename:  test_bmp.c
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  09/12/12 10:43:11
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Andyli (gl), andy.y.li@163.com
 *        Company: gl 
 *
 * =====================================================================================
 */

#include "bmplib.h"
#include <stdio.h>

int main(int argc,char *argv[])
{
	if (argc < 3){
		fprintf(stderr,"Usage: %s srcImage dstImage\n",argv[0]);
		return -1;
	}

	ClImage *srcImage = clLoadImage(argv[1]);
	if (srcImage == NULL){
		fprintf(stderr,"Can not load file: %s\n",argv[1]);
		return -1;
	}
	bool flag = clSaveImage(argv[2],srcImage);
	if (flag){
		fprintf(stdout,"Save image OK!\n");
	}

	return 0;
}

